#include "RegisterAddress.h"

//空调
int AC_REG_INT_MIN = 1;
int AC_REG_INT_MAX = 200;
int AC_REG_FLT_MIN = 201;
int AC_REG_FLT_MAX = 600;
int AC_REG_SET_MIN = 30001;
int AC_REG_SET_MAX = 30200;

//是不是空调的寄存器
bool IsAcReg(quint16 usReg)
{
    if (usReg >= AC_REG_INT_MIN && usReg <= AC_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= AC_REG_FLT_MIN && usReg <= AC_REG_FLT_MAX)
    {
        return true;
    }
    else if (usReg >= AC_REG_SET_MIN && usReg <= AC_REG_SET_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//温湿度
int TH_REG_INT_MIN = 601;
int TH_REG_INT_MAX = 800;
int TH_REG_FLT_MIN = 801;
int TH_REG_FLT_MAX = 1200;

//是不是温湿度的寄存器
bool IsThReg(quint16 usReg)
{
    if (usReg >= TH_REG_INT_MIN && usReg <= TH_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= TH_REG_FLT_MIN && usReg <= TH_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//水浸
int WATER_REG_INT_MIN = 1201;
int WATER_REG_INT_MAX = 1400;
int WATER_REG_FLT_MIN = 1401;
int WATER_REG_FLT_MAX = 1800;

//是不是水浸的寄存器
bool IsWaterReg(quint16 usReg)
{
    if (usReg >= WATER_REG_INT_MIN && usReg <= WATER_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= WATER_REG_FLT_MIN && usReg <= WATER_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//消防
int FIRE_REG_INT_MIN = 1801;
int FIRE_REG_INT_MAX = 2000;
int FIRE_REG_FLT_MIN = 2001;
int FIRE_REG_FLT_MAX = 2400;

//是不是消防的寄存器
bool IsFireReg(quint16 usReg)
{
    if (usReg >= FIRE_REG_INT_MIN && usReg <= FIRE_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= FIRE_REG_FLT_MIN && usReg <= FIRE_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//液冷
int LC_REG_INT_MIN = 2401;
int LC_REG_INT_MAX = 2600;
int LC_REG_FLT_MIN = 2601;
int LC_REG_FLT_MAX = 3000;
int LC_REG_SET_MIN = 32401;
int LC_REG_SET_MAX = 32600;

//是不是液冷的寄存器
bool IsLcReg(quint16 usReg)
{
    if (usReg >= LC_REG_INT_MIN && usReg <= LC_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= LC_REG_FLT_MIN && usReg <= LC_REG_FLT_MAX)
    {
        return true;
    }
    else if (usReg >= LC_REG_SET_MIN && usReg <= LC_REG_SET_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//逆变器PCS
int PCS_REG_INT_MIN = 3001;
int PCS_REG_INT_MAX = 3200;
int PCS_REG_FLT_MIN = 3201;
int PCS_REG_FLT_MAX = 3600;
int PCS_REG_SET_MIN = 33001;
int PCS_REG_SET_MAX = 33200;

//是不是Pcs的寄存器
bool IsPcsReg(quint16 usReg)
{
    if (usReg >= PCS_REG_INT_MIN && usReg <= PCS_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= PCS_REG_FLT_MIN && usReg <= PCS_REG_FLT_MAX)
    {
        return true;
    }
    else if (usReg >= PCS_REG_SET_MIN && usReg <= PCS_REG_SET_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//电表
int METER_REG_INT_MIN = 3601;
int METER_REG_INT_MAX = 3800;
int METER_REG_FLT_MIN = 3801;
int METER_REG_FLT_MAX = 4200;

//是不是电表的寄存器
bool IsMeterReg(quint16 usReg)
{
    if (usReg >= METER_REG_INT_MIN && usReg <= METER_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= METER_REG_FLT_MIN && usReg <= METER_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//环控
int EC_REG_INT_MIN = 4201;
int EC_REG_INT_MAX = 4400;
int EC_REG_FLT_MIN = 4401;
int EC_REG_FLT_MAX = 4800;

//是不是环控的寄存器
bool IsEcReg(quint16 usReg)
{
    if (usReg >= EC_REG_INT_MIN && usReg <= EC_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= EC_REG_FLT_MIN && usReg <= EC_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//门禁
int DOOR_REG_INT_MIN = 4801;
int DOOR_REG_INT_MAX = 5000;
int DOOR_REG_FLT_MIN = 5001;
int DOOR_REG_FLT_MAX = 5400;

//是不是门禁的寄存器
bool IsDoorReg(quint16 usReg)
{
    if (usReg >= DOOR_REG_INT_MIN && usReg <= DOOR_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= DOOR_REG_FLT_MIN && usReg <= DOOR_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//可燃气体
int GAS_REG_INT_MIN = 5401;
int GAS_REG_INT_MAX = 5600;
int GAS_REG_FLT_MIN = 5601;
int GAS_REG_FLT_MAX = 6000;

//是不是可燃气体的寄存器
bool IsGasReg(quint16 usReg)
{
    if (usReg >= GAS_REG_INT_MIN && usReg <= GAS_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= GAS_REG_FLT_MIN && usReg <= GAS_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//DCDC
int DCDC_REG_INT_MIN = 6001;
int DCDC_REG_INT_MAX = 6200;
int DCDC_REG_FLT_MIN = 6201;
int DCDC_REG_FLT_MAX = 6600;

//是不是Dcdc的寄存器
bool IsDcdcReg(quint16 usReg)
{
    if (usReg >= DCDC_REG_INT_MIN && usReg <= DCDC_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= DCDC_REG_FLT_MIN && usReg <= DCDC_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//充电桩
int CP_REG_INT_MIN = 6601;
int CP_REG_INT_MAX = 6800;
int CP_REG_FLT_MIN = 6801;
int CP_REG_FLT_MAX = 7200;

//是不是充电桩的寄存器
bool IsCpReg(quint16 usReg)
{
    if (usReg >= CP_REG_INT_MIN && usReg <= CP_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= CP_REG_FLT_MIN && usReg <= CP_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//除湿机
int DH_REG_INT_MIN = 7201;
int DH_REG_INT_MAX = 7400;
int DH_REG_FLT_MIN = 7401;
int DH_REG_FLT_MAX = 7800;

//是不是除湿机的寄存器
bool IsDhReg(quint16 usReg)
{
    if (usReg >= DH_REG_INT_MIN && usReg <= DH_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= DH_REG_FLT_MIN && usReg <= DH_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//风扇
int FAN_REG_INT_MIN = 7801;
int FAN_REG_INT_MAX = 8000;
int FAN_REG_FLT_MIN = 8001;
int FAN_REG_FLT_MAX = 8400;

//是不是风扇的寄存器
bool IsFanReg(quint16 usReg)
{
    if (usReg >= FAN_REG_INT_MIN && usReg <= FAN_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= FAN_REG_FLT_MIN && usReg <= FAN_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//STS
int STS_REG_INT_MIN = 8401;
int STS_REG_INT_MAX = 8600;
int STS_REG_FLT_MIN = 8601;
int STS_REG_FLT_MAX = 9000;

//是不是STS的寄存器
bool IsStsReg(quint16 usReg)
{
    if (usReg >= STS_REG_INT_MIN && usReg <= STS_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= STS_REG_FLT_MIN && usReg <= STS_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//压力传感器
int PRESS_REG_INT_MIN = 9001;
int PRESS_REG_INT_MAX = 9200;
int PRESS_REG_FLT_MIN = 9201;
int PRESS_REG_FLT_MAX = 9600;

//是不是压力传感器的寄存器
bool IsPressReg(quint16 usReg)
{
    if (usReg >= PRESS_REG_INT_MIN && usReg <= PRESS_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= PRESS_REG_FLT_MIN && usReg <= PRESS_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//液位传感器
int LEVEL_REG_INT_MIN = 9601;
int LEVEL_REG_INT_MAX = 9800;
int LEVEL_REG_FLT_MIN = 9801;
int LEVEL_REG_FLT_MAX = 10200;

//是不是液位传感器的寄存器
bool IsLevelReg(quint16 usReg)
{
    if (usReg >= LEVEL_REG_INT_MIN && usReg <= LEVEL_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= LEVEL_REG_FLT_MIN && usReg <= LEVEL_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//光伏
int PV_REG_INT_MIN = 10201;
int PV_REG_INT_MAX = 10400;
int PV_REG_FLT_MIN = 10401;
int PV_REG_FLT_MAX = 10800;

//是不是光伏的寄存器
bool IsPvReg(quint16 usReg)
{
    if (usReg >= PV_REG_INT_MIN && usReg <= PV_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= PV_REG_FLT_MIN && usReg <= PV_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//UPS
int UPS_REG_INT_MIN = 10801;
int UPS_REG_INT_MAX = 11000;
int UPS_REG_FLT_MIN = 11001;
int UPS_REG_FLT_MAX = 11400;

//是不是UPS的寄存器
bool IsUpsReg(quint16 usReg)
{
    if (usReg >= UPS_REG_INT_MIN && usReg <= UPS_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= UPS_REG_FLT_MIN && usReg <= UPS_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}

//LED灯
int LED_REG_INT_MIN = 11401;
int LED_REG_INT_MAX = 11600;
int LED_REG_FLT_MIN = 11601;
int LED_REG_FLT_MAX = 12000;

//是不是LED灯的寄存器
bool IsLedReg(quint16 usReg)
{
    if (usReg >= LED_REG_INT_MIN && usReg <= LED_REG_INT_MAX)
    {
        return true;
    }
    else if (usReg >= LED_REG_FLT_MIN && usReg <= LED_REG_FLT_MAX)
    {
        return true;
    }
    else
    {
        return false;
    }
}
